import { ref } from "vue";
import { useRoute } from "vue-router";
import GithubIcon from "@/assets/icon-github.svg";

export const useListData = () => {
  const navList = ref([
    {
      name: "introduce",
      text: "指南"
    },
    {
      name: "button",
      text: "组件"
    },
    {
      href: "/",
      url: GithubIcon,
      text: "Github"
    }
  ]);

  const { path } = useRoute();
  const isHome = Object.freeze(path === "/");
  return { navList, isHome };
};
